package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CarServiceMapper;
import com.ruoyi.system.domain.CarService;
import com.ruoyi.system.service.ICarServiceService;

/**
 * 货运服务Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-06-17
 */
@Service
public class CarServiceServiceImpl implements ICarServiceService 
{
    @Autowired
    private CarServiceMapper carServiceMapper;



    /**
     * 查询货运服务
     * 
     * @param carId 货运服务ID
     * @return 货运服务
     */
    @Override
    public CarService selectCarServiceById(Long carId)
    {
        return carServiceMapper.selectCarServiceById(carId);
    }

    /**
     * 查询货运服务列表
     * 
     * @param carService 货运服务
     * @return 货运服务
     */
    @Override
    public List<CarService> selectCarServiceList(CarService carService)
    {
        return carServiceMapper.selectCarServiceList(carService);
    }

    /**
     * 新增货运服务
     * 
     * @param carService 货运服务
     * @return 结果
     */
    @Override
    public int insertCarService(CarService carService)
    {
       carService.setCarCreattime(DateUtils.getNowDate());

        return carServiceMapper.insertCarService(carService);
    }

    /**
     * 修改货运服务
     * 
     * @param carService 货运服务
     * @return 结果
     */
    @Override
    public int updateCarService(CarService carService)
    {
        return carServiceMapper.updateCarService(carService);
    }

    /**
     * 批量删除货运服务
     * 
     * @param carIds 需要删除的货运服务ID
     * @return 结果
     */
    @Override
    public int deleteCarServiceByIds(Long[] carIds)
    {
        return carServiceMapper.deleteCarServiceByIds(carIds);
    }

    /**
     * 删除货运服务信息
     * 
     * @param carId 货运服务ID
     * @return 结果
     */
    @Override
    public int deleteCarServiceById(Long carId)
    {
        return carServiceMapper.deleteCarServiceById(carId);
    }
}
